import { Subject } from 'rxjs';

// 选择数据源传值
const eChartsAreaBarSource = new Subject();
export const eChartsAreaBarSource$ = eChartsAreaBarSource.asObservable();

const eChartMachineStatisticsSource = new Subject();
export const eChartMachineStatisticsSource$ = eChartMachineStatisticsSource.asObservable();

const eChartMachineStatisticsMonthSource = new Subject();
export const eChartMachineStatisticsMonthSource$ = eChartMachineStatisticsMonthSource.asObservable();

const eChartsRealTimeSource = new Subject();
export const eChartsRealTimeSource$ = eChartsRealTimeSource.asObservable();

export function setEChartsAreaBarOption(options) {
  eChartsAreaBarSource.next(options);
}

export function setEChartsRealTimeOption(options) {
  eChartsRealTimeSource.next(options);
}

export function setEChartMachineStatisticsOption(options) {
  eChartMachineStatisticsSource.next(options);
}

export function setEChartMachineStatisticsMonthOption(options) {
  eChartMachineStatisticsMonthSource.next(options);
}
